package com.hnas.eCard.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.hnas.eCard.dao.MerchantDao;
import com.hnas.eCard.orm.Merchant;
import com.hnas.eCard.service.MerchantService;

@Component("merchantService")
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public class MerchantServiceImpl implements MerchantService {

	@Autowired
	private MerchantDao merchantDao;

	@Override
	public List<Merchant> listAll() {
		return this.merchantDao.listAll();
	}

	@Override
	public Merchant findById(String merchantId) {
		return merchantDao.findById(merchantId);
	}


}
